Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts DataGrid internal keyboard navigation focus initialization logic to further restrict when the focused cell position is updated during focusin events.
Changes:
- Update
focusinHandlerto call_updateFocusedCellPositiononly when the focus moved from an element within the RowsView (isRelatedTargetInRowsView).
packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts
Outdated
Show resolved
Hide resolved
| if (isCell && needSetFocusPosition) { | ||
| this._focusView(); | ||
| this._updateFocusedCellPosition($element); | ||
| } |
There was a problem hiding this comment.
This change modifies focus behavior when a cell receives focus while focusedRowIndex is not set (< 0). There doesn’t appear to be a regression test that covers focusing a td in this state and asserting that keyboard navigation initializes its focused view correctly (and doesn’t throw / mis-handle subsequent focus updates). Please add a test (likely in packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js or keyboardNavigation.keyboardController.tests.js) that triggers focusin on a data cell with focusedRowIndex: -1/undefined and validates the expected focus state.
No description provided.